package main

import(
	"os"
	"github.com/service"
	flag "github.com/spf13/pflag"
)

const(
	port string = "9000"
)

func main()  {
	PORT := os.Getenv("port")
	if len(PORT) == 0 {
		PORT = port;
	}

	p := flag.StringP("PORT", "p", port, "PORT for listening")
	flag.Parse()
	if len(*p) != 0 {
		PORT = *p
	}

	service.NewS(PORT);
}